﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

/**
 * 创建时间：2014/11/18 15:01:23
 * 作者：yong.blackcore
 * Email：itblackhole@outlook.com
 * QQ：50404503
 */
namespace CUWo.Common.Entities
{
    /// <summary>
    /// 永久存储
    /// <para>APP不卸载就会永久保存的信息</para>
    /// </summary>
    [DataContract]
    public class RomInfo
    {
        [DataMember]
        public string Mobile { get; set; }

        [DataMember]
        public string Password { get; set; }

        private bool _isPush = true;

        /// <summary>
        /// 是否接受推送消息
        /// </summary>
        [DataMember]
        public bool IsPush
        {
            get { return _isPush; }
            set { _isPush = value; }
        }

        
        public bool IsEmpty()
        {
            //if (string.IsNullOrWhiteSpace(Mobile) || string.IsNullOrWhiteSpace(Password))
            if (string.IsNullOrWhiteSpace(Mobile))
            {
                return true;
            }
            return false;
        }
    }
}
